package com.wzh.ojbackendjudgeservice.controller;

import com.wzh.ojModel.model.entity.QuestionSubmit;
import com.wzh.ojbackendjudgeservice.service.JudgeService;
import com.wzh.ojbackendserviceclient.service.JudgeFeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wzh
 */
@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {

    @Resource
    private JudgeService judgeService;
    @PostMapping("/do")
    @Override
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId")long questionSubmitId) {
        return  judgeService.doJudge(questionSubmitId);
    }
}
